<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
    /* html,body,div { margin: 0;} */
    .top { 
        background-color: blueviolet;
        height: 100px;
    }   
    .footer{
        background-color:yellow;
        height: 70px;
        clear: both;
    }
    .left{
        background-color:pink;
        height: 300px;
        width: 30%;
        float: left;
    }
    .right{
        background-color:orange;
        height: 300px;
        width: 70%;
        float: left;
    }
    </style>
</head>
<body>
    <h1>布局练习</h1>

    <div class="top">顶部</div>
    <div class="left">左</div><div class="right">右</div>
    <div class="footer">底部</div>

</body>
</html>